<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0
        }

        a {
            color: #fff;
        }
    </style>
</head>

<body>
    <div style="float: left;width:400px;height:100vh;background:purple;">
        <h1><a href="index.html" target="main">主页</a></h1>
        <h1><a href="reg.html" target="main">注册</a></h1>
        <h1><a href="login.html" target="main">登录</a></h1>
    </div>
    <iframe name="main" src="index.html" frameborder="0" style="float:right;width:calc(100% - 402px);height: 100vh"></iframe>
</body>

</html>